package com.sg.web;

import com.sg.service.JoinService;
import com.sg.vo.JoinVO;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author lyx
 * 招聘首页控制器
 */
@Controller
public class JobIndexController {
    @Autowired
    JoinService joinService;

    Logger logger = Logger.getLogger(JobIndexController.class);

    @RequestMapping({"/join/indexjoin", "/"})
    public String index(Model model) {
        logger.info("indexjoin---");
        List<JoinVO> joinlist = joinService.findAll();
        model.addAttribute("joinlist", joinlist);
        return "join/indexjoin";
    }

    @RequestMapping("/join/mainjoin")
    public String mainjoin() {
        logger.info("mainjoin---");
        return "join/mainjoin";
    }
    @RequestMapping("/admin/jobmain")
    public String jobmain() {
        logger.info("jobmain---");
        return "admin/jobmain";
    }
}
